<template>
	<view class="contain">
		<uni-header></uni-header>
		<view class="padding-15">
			<view class="bg-color-w bg-shadow-0 padding-lr10">
				<view class="padding-tb6"></view>
				<view class="flex f-a-c f-j-s">
					<view class="b-line flex f-a-c">
						<text class="f16-size f-w-500">Order Details</text>
					</view>
				</view>
				<view class="padding-10 bg-color-f7 margin-t12 b-radius-5">
					<view class="flex padding-tb6">
						<view class="flex f-s-0 t-color-9">Order Number</view>
						<view class="flex flex-1 f-j-e f-w-500">{{info.order_id}}</view>
					</view>
					<view class="flex padding-tb6">
						<view class="flex f-s-0 t-color-9">Order Date</view>
						<view class="flex flex-1 f-j-e f-w-500">{{info.create_time}}</view>
					</view>
					<view class="flex padding-tb6">
						<view class="flex f-s-0 t-color-9">State</view>
						<view class="flex flex-1 f-j-e f-w-500">{{info.string}}</view>
					</view>
					<view class="flex padding-tb6">
						<view class="flex f-s-0 t-color-9">Order Amount</view>
						<view class="flex flex-1 f-j-e f-w-500">{{info.amount}}</view>
					</view>
					<view class="flex padding-tb6">
						<view class="flex f-s-0 t-color-9">Payment Method</view>
						<view class="flex flex-1 f-j-e f-w-500">{{info.payment_method}}</view>
					</view>
					<view class="flex padding-tb6">
						<view class="flex f-s-0 t-color-9">Delivery Method</view>
						<view class="flex flex-1 f-j-e f-w-500">{{info.delivery_method}}</view>
					</view>
				</view>
				<view class="padding-tb6"></view>
			</view>
			
			
			<view class="bg-color-w bg-shadow-0 padding-lr10 margin-t16">
				<view class="padding-tb6"></view>
				<view class="flex f-a-c f-j-s ">
					<view class="b-line flex f-a-c">
						<text class="f16-size f-w-500">Address Information</text>
					</view>
				</view>
				<view class="b-bottom margin-t16">
					<view class=" b-bottom"></view>
					<view class="padding-tb6"></view>
					<view class="margin-b10 f-w-500">
						Full name: {{info.address.full_name}}
					</view>
					<view class="margin-b10 f-w-500">
						Address: {{info.address.address1}} {{info.address.city}} {{info.address.zone}} {{info.address.country}}
					</view>
					<view class="margin-b10 f-w-500">
						Zip Code: {{info.address.zip_code}}
					</view>
				</view>
				<view class="padding-tb6"></view>
			</view>
			
			
		</view>
	</view>
</template>
<style scoped>
</style>
<script>
	const $ = require('@/utils/api.js');
	let self = this;
	export default {
		components: {},
		data() {
			return {
				id: '',
				info: ''
			};
		},
		onLoad: function(options) {
			self = this;
			this.id = options.id ? options.id : '';
			this.init();
		},
		onShow() {
		},
		methods: {
			getDetail() {
				$.ajax({
					url: '/v1/tk_shop/user/order/detail',
					data: {order_id:this.id},
					method: 'POST',
					success(res) {
						self.info = res.data ? res.data : '';
					}
				})
			},
			init() {
				this.getDetail();
			},
		},
		computed: {},
		created() {
		},
		mounted() {},
		destroyed() {},
		onPullDownRefresh() {
		},
		onReachBottom() {
			
		}
	}
</script>